package com.fetchdata.api;

import cemp.common.api.reponse.RestCommonResponse;
import cemp.common.api.reponse.RestStockAllResponse;
import cemp.common.api.reponse.RestStockDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "stock-fetch-data")
public interface FetchDataApi {

    @GetMapping("/api/fetchdata/stockdetails")
    List<RestStockDetailResponse> getStockDetails();

    @GetMapping("/api/fetchdata/allstocks")
    List<RestStockAllResponse> getAllStocks();

    @GetMapping("/api/fetchdata/getplates")
    RestCommonResponse getPlates(@RequestParam("pageNum") Integer pageNum,
                                 @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/api/fetchdata/getplateStocks")
    RestCommonResponse getPlateStocks(@RequestParam("pageNum") Integer pageNum,
                                 @RequestParam("pageSize") Integer pageSize,
                                 @RequestParam("platecode")String platecode);

    @GetMapping("/api/fetchdata/getStockInfo")
    RestCommonResponse getStockInfo(@RequestParam("stockCode") String stockCode);


}
